package com.jrx.anytxn.transaction.service;

import com.jrx.anytxn.common.exception.TxnBizException;
import com.jrx.anytxn.common.exception.TxnException;
import com.jrx.anytxn.transaction.bean.*;
import com.jrx.anytxn.transaction.entity.AmDelinquencyInfo;
import com.jrx.anytxn.transaction.entity.AmLoanAccountInfo;
import com.jrx.anytxn.transaction.entity.AmRepaymentPlanInfo;
import com.jrx.anytxn.transaction.entity.BtDelqList;

import java.util.Date;

/**
 * @program: anytxn-cf-transaction
 * @description: 延滞处理接口
 * @author: xiaoyu.jing
 * @date: 2019-11-14 11:24
 **/
public interface IDealDelqService {

    /**
     * 构建延滞处理参数
     * @param tenentId
     * @param delqId
     * @return
     */
    DelqParamBean buildDqlqAccountBean(String tenentId, String delqId) throws TxnBizException;

    /**
     * 构建延滞处理列表
     * @param plan
     * @return
     */
    BtDelqList buildBtDelqList(AmRepaymentPlanInfo plan, Date bussinessDay) throws TxnBizException;

    /**
     * 构建延滞处理列表
     * @param delq
     * @return
     */
    BtDelqList buildBtDelqList(AmDelinquencyInfo delq, Date bussinessDay) throws TxnBizException;

    /**
     * 延滞处理
     * @param dealDelqBean
     * @return
     * @throws TxnBizException
     */
    DelqSaveBean dealDelq(DealDelqBean dealDelqBean) throws TxnBizException;

    /**
     * 延滞外转列处理 会计状态升级，转非应计，五级分类升级
     * @param dealTransOutBean
     * @return
     */
    DelqTransOutSaveBean dealDelqTransOut(DealTransOutBean dealTransOutBean) throws TxnException;

    /**
     * 延滞内转列处理 会计状态降级，转应计，五级分类降级
     * @param dealTransInBean
     * @return
     */
    DelqTransInSaveBean dealDelqTransIn(DealTransInBean dealTransInBean) throws TxnException;
}
